Skip to content

Enforce pre-API input validation in experiment state loader (SEC-002)#31002

Merged
pelikhan merged 10 commits intomainfrom
copilot/sec-002-fix-api-call-order
May 8, 2026
Merged

Enforce pre-API input validation in experiment state loader (SEC-002)#31002
pelikhan merged 10 commits intomainfrom
copilot/sec-002-fix-api-call-order

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 8, 2026

The safe-outputs conformance check flagged load_experiment_state_from_repo.cjs for calling octokit.rest.repos.getContent before validating request inputs. This change moves validation ahead of the API call and hardens branch/repo input checks.

  • Pre-fetch validation added in loader

    • Introduced validateInputs(branch, owner, repo, repository) in actions/setup/js/load_experiment_state_from_repo.cjs.
    • main() now validates GH_AW_EXPERIMENT_BRANCH and raw GITHUB_REPOSITORY before invoking fetchFileFromBranch(...).
    • Branch validation enforces an allowlist character set and rejects traversal-like .. sequences.
    • Repository validation now requires strict owner/repo format with allowlisted characters, rejecting malformed values (whitespace, missing parts, extra segments) before API usage.
  • Main flow updated to fail closed before remote fetch

    • Replaced split early checks with a single validation gate.
    • On validation failure, loader exits with existing “starting with empty experiment state” behavior, without any GitHub API request.
  • Focused test coverage expanded

    • Added direct tests for validateInputs(...) covering valid input, empty branch, invalid branch chars, traversal-like branch, malformed repository formats, and missing owner/repo scenarios.
    • Added main() assertions that invalid branch input and invalid GITHUB_REPOSITORY format do not call getContent.
const validationResult = validateInputs(branch, owner, repo, repository);
if (!validationResult.valid) {
  core.warning(`${validationResult.error} – starting with empty experiment state`);
  fs.mkdirSync(stateDir, { recursive: true });
  return;
}
content = await fetchFileFromBranch(octokit, owner, repo, branch, stateFileName);

[!WARNING]

Copilot AI and others added 6 commits May 8, 2026 11:09
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/8a00e8a1-662f-48b8-aec9-dc885cececce

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
This reverts commit ed7de6e.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix API call order in load_experiment_state_from_repo.cjs Enforce pre-API input validation in experiment state loader (SEC-002) May 8, 2026
@pelikhan pelikhan marked this pull request as ready for review May 8, 2026 11:27
Copilot AI review requested due to automatic review settings May 8, 2026 11:27
Copilot AI requested a review from pelikhan May 8, 2026 11:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses SEC-002 by ensuring experiment state loader inputs are validated before any GitHub API request is made, so invalid inputs fail closed and skip remote fetches.

Changes:

  • Added a validateInputs(branch, owner, repo) gate to validate branch/repo inputs prior to calling octokit.rest.repos.getContent.
  • Updated main() to use the centralized validation and return early with the existing “starting with empty experiment state” behavior (without remote fetch) on failure.
  • Expanded unit tests to cover validateInputs(...) and to assert main() does not call getContent when branch input is invalid.
Show a summary per file
File Description
actions/setup/js/load_experiment_state_from_repo.cjs Introduces validateInputs and moves input validation ahead of the GitHub API fetch.
actions/setup/js/load_experiment_state_from_repo.test.cjs Adds direct validation tests and a main() regression test ensuring invalid inputs skip the API call.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

Comment on lines +61 to +63
if (!owner || !repo) {
return { valid: false, error: "GITHUB_REPOSITORY is not set" };
}
@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented May 8, 2026

@copilot review all comments

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 8, 2026

@copilot review all comments

Implemented and pushed follow-up updates addressing the review feedback on strict repository validation before API use in load_experiment_state_from_repo.cjs, with expanded focused tests for malformed GITHUB_REPOSITORY formats. Addressed in commit e649de3.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
    • Triggering command: /usr/bin/gh gh repo view --json owner,name --jq .owner.login &#43; &#34;/&#34; &#43; .name k/gh-aw/node_modules/.bin/node (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw l n-dir/grep ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -1 rep grep (http block)
  • https://api.github.com/orgs/test-owner/actions/secrets
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name h ../../../.prettierignore st.lock.yml bin/grep (http block)
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name h ../../../.prettierignore -analyzer.lock.yml ache/go/1.25.8/x64/bin/grep (http block)
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name h ../../../.prettierignore -analyzer.lock.yml cal/bin/grep (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq [.object.sha, .object.type] | @tsv --show-toplevel sh /usr/bin/git runs/20260508-11git grep /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linuremote.origin.url /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq [.object.sha, .object.type] | @tsv --show-toplevel sh /usr/bin/git runs/20260508-11git grep /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linuremote.origin.url /usr/bin/git ithub-script/gitgh -importcfg (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq [.object.sha, .object.type] | @tsv --show-toplevel sh /usr/bin/git runs/20260508-11git grep /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linuorigin /usr/bin/git -bool -buildtags /opt/hostedtoolc/repos/actions/github-script/git/ref/tags/v9 git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq [.object.sha, .object.type] | @tsv --get remote.origin.url /usr/bin/git ion-refactor.locgh s/smoke-opencodeapi cal/bin/grep git init�� 1/x64/bin/grep resolved$ /usr/bin/gh 939/001/stabilitgit s/sub-issue-closrev-parse de_modules/.bin/--show-toplevel gh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq [.object.sha, .object.type] | @tsv ithub-script/git/ref/tags/v9 myorg bject.type] | @tsv 60149/001 s/smoke-opencodeapi ules/.bin/node git rev-�� --show-toplevel grep (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq [.object.sha, .object.type] | @tsv --get remote.origin.url (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv ithub/workflows/api-consumption-report.md grep ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet rkflow/js/**/*.jgit ector.lock.yml erignore ache/go/1.25.8/x64/pkg/tool/linuremote2 --no�� 2850770190 grep /opt/hostedtoolcache/node/24.14.1/x64/bin/sh ./../.prettieriginfocmp ml /home/REDACTED/.loxterm-color sh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git --symref origin /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git /tmp/gh-aw-test-git config /usr/bin/infocmp--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv --show-toplevel /usr/bin/git /usr/bin/gh -v erignore /usr/bin/git gh api /repos/actions/setup-go/git/ref/tags/v4 --jq /usr/bin/infocmp --show-toplevel ache/go/1.25.8/xrev-parse /usr/bin/infocmp--show-toplevel infocmp (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv /ref/tags/v9 -buildtags sv -errorsas -ifaceassert -nilfunc ache/node/24.14.current (local changes) s-35�� .actor }}, Unsafbase (original) -tests /usr/bin/git d ck.yml /node git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv run --auto (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv --show-toplevel grep /usr/bin/git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq [.object.sha, .object.type] | @tsv xterm-color git /usr/bin/git /usr/local/bin/ggh grep /usr/bin/git git rev-�� --show-toplevel git /usr/bin/infocmp -m Initial commit /usr/bin/git infocmp (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq [.object.sha, .object.type] | @tsv xterm-color test /usr/bin/git --show-toplevel (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq [.object.sha, .object.type] | @tsv xterm-color git /usr/bin/git --show-toplevel grep rue,&#34;errors&#34;:[],/repos/actions/github-script/git/ref/tags/v9 git rev-�� --show-toplevel /usr/lib/git-core/git /usr/bin/infocmp /ref/tags/v9 --auto sv infocmp (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v9
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv re --log-level=error -red-team.lock.yml /usr/local/bin/grep (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv re --log-level=error -red-team.lock.yml /snap/bin/grep (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v9.0.0
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9.0.0 --jq [.object.sha, .object.type] | @tsv (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9.0.0 --jq [.object.sha, .object.type] | @tsv stem.type arm.lock.yml n-dir/grep (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9.0.0 --jq [.object.sha, .object.type] | @tsv -template-expressions.md ck.yml ndor/bin/grep (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel ache/go/1.25.8/x--jq /usr/bin/infocmp CompiledOutput18gh grep ache/node/24.14./repos/actions/github-script/git/ref/tags/v9 infocmp -1 xterm-color node /usr/bin/git 4229-13263/test-git --write es.lock.yml git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv xterm-color ache/go/1.25.8/x64/pkg/tool/linuremote1 /usr/bin/infocmp p/bin/grep grep /home/REDACTED/worxterm-color infocmp -1 xterm-color sh /usr/bin/git ithub/workflows grep 073148/b407/vet.--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel grep /usr/bin/git CompiledOutput39infocmp grep 1/x64/bin/node git rev-�� --show-toplevel 1/x64/bin/node /usr/bin/git ts.TOKEN --write ache/node/24.14.--show-toplevel git (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv 2119465558 test@example.com /usr/bin/gh on&#39; --ignore-patgit yml tnet/tools/grep gh api /repos/actions/github-script/git/ref/tags/v9 --jq /usr/bin/git ./../pkg/workflogit s/stale-pr-cleanrev-parse x_amd64/vet git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel ache/go/1.25.8/x64/pkg/tool/linuremote.origin.url /usr/bin/git enforceCommentLigh actions/setup/jsapi (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv ithub-script/git/ref/tags/v9 git bject.type] | @tsv /tmp/gh-aw-test-git config /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git user.email test@example.com-1 /usr/bin/git git (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv -bool -buildtags ache/node/24.14.1/x64/bin/node -errorsas -ifaceassert -nilfunc ache/node/24.14.1/x64/bin/node -206�� user.email test@example.com /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv git-upload-pack &#39;/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitbranch_with_hyphen3532016191/git l /usr/bin/git h ../../../.pretgit -analyzer.lock.yrev-parse /home/REDACTED/.lo--show-toplevel git -C /ref/tags/v9 rev-parse sv w/js/**/*.json&#39; git up.lock.yml n-dir/grep git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv --get l (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel grep /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv cal/bin/grep grep /usr/bin/infocmp d-robin&#39; sions-warning.lorev-parse nfig/composer/ve--show-toplevel infocmp -1 xterm-color grep /usr/bin/git RY\|cache-memorygit s/contribution-crev-parse cal/bin/grep git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv /tmp/TestCompileUpdateDiscussionFieldEnforcement3930113906/001 config /usr/bin/git remote.origin.urgit blic-approved.lorev-parse odules/npm/node_--show-toplevel git rev-�� --show-toplevel grep /usr/bin/git (http block)
  • https://api.github.com/repos/aws-actions/configure-aws-credentials/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/aws-actions/configure-aws-credentials/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel node /usr/bin/git ErrorFormatting3git grep e/git git rev-�� --show-toplevel e/git /usr/bin/git --show-toplevel grep /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/aws-actions/configure-aws-credentials/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel infocmp /usr/bin/git ithub-script/gitgh grep bject.type] | @t/repos/actions/github-script/git/ref/tags/v9 git rev-�� --show-toplevel git /usr/bin/infocmp runs/20260508-11git grep /usr/bin/gh infocmp (http block)
    • Triggering command: /usr/bin/gh gh api /repos/aws-actions/configure-aws-credentials/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel infocmp /usr/bin/git xterm-color grep (http block)
  • https://api.github.com/repos/azure/login/git/ref/tags/v2
    • Triggering command: /usr/bin/gh gh api /repos/azure/login/git/ref/tags/v2 --jq [.object.sha, .object.type] | @tsv --show-toplevel gh /usr/bin/git /repos/actions/ggit --jq /usr/bin/git git rev-�� --show-toplevel git /usr/bin/gh --show-toplevel grep /usr/bin/git gh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/azure/login/git/ref/tags/v2 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git 94513/001 rev-parse /usr/bin/git git rev-�� --show-toplevel git /usr/bin/gh /tmp/gh-aw-test-infocmp l /usr/bin/git gh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/azure/login/git/ref/tags/v2 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git /tmp/gh-aw-test-git remote /usr/bin/git git rev-�� --show-toplevel git /usr/bin/gh runs/20260508-11infocmp grep /usr/bin/git gh (http block)
  • https://api.github.com/repos/docker/login-action/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git /tmp/gh-aw-test-git config /usr/bin/infocmp--show-toplevel git rev-�� /ref/tags/v9 infocmp sv s/test.md grep /usr/bin/git gh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq [.object.sha, .object.type] | @tsv --show-toplevel node /usr/bin/git /home/REDACTED/worgit grep /usr/bin/git git rev-�� /ref/tags/v9 git sv --show-toplevel grep me: String!) { xterm-color gh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git /tmp/gh-aw-test-git rev-parse /opt/hostedtoolc--show-toplevel git rev-�� /ref/tags/v9 /opt/hostedtoolcache/node/24.14.1/x64/bin/node sv REDACTED.os grep /usr/bin/git gh (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v0.1.2
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq [.object.sha, .object.type] | @tsv xterm-color grep /usr/bin/gh Onlyrepos_only_wgh on rkflow/js/**/*.j/repos/actions/github-script/git/ref/tags/v9 gh repo�� view owner/test-repo (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq [.object.sha, .object.type] | @tsv --show-toplevel awk /usr/bin/infocmp ExpressionCompilgit grep ache/node/24.14.--show-toplevel infocmp -1 xterm-color sh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq [.object.sha, .object.type] | @tsv xterm-color awk /usr/bin/infocmp .github/workflowinfocmp on rkflow/js/**/*.jxterm-color infocmp -1 xterm-color sh (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv --show-toplevel grep /usr/bin/git json&#39; --ignore-pgit -consolidator.lorev-parse rgo/bin/grep git -C /ref/tags/v9 remote sv th .prettierignogit s/daily-securityrev-parse ache/uv/0.11.11/--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv --show-toplevel grep /usr/bin/git json&#39; --ignore-pgit -consolidator.lorev-parse ules/.bin/pretti--show-toplevel git rev-�� /ref/tags/v9 grep sv RY\|cache-memorygit s/daily-securityrev-parse odules/npm/node_--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv ache/go/1.25.8/x/tmp/TestHashConsistency_InlinedImports2119583659/001/inlined-a.md grep /usr/bin/git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv --show-toplevel (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv --show-toplevel grep /usr/bin/gh json&#39; --ignore-pgit -consolidator.lorev-parse ache/go/1.25.8/x--show-toplevel gh api /repos/actions/github-script/git/ref/tags/v9 --jq (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv k/_temp/uv-pythogit-upload-pack &#39;/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitmain_branch35git grep /usr/bin/git ned-imports-enabgit k.yml ache/uv/0.11.11/--show-toplevel git rev-�� --show-toplevel grep /usr/bin/git Gitbranch_with_hgit Gitbranch_with_hrev-parse nfig/composer/ve--show-toplevel git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created &gt;=2026-05-01 uctural-analysispull /home/REDACTED/.lotest/race-image:v1.0.0 grep itma�� s/daily-cache-strategy-analyzer.lock.yml .github/workflows/contribution-check.lock.yml de_modules/.bin/sh (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created &gt;=2026-04-08 (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created &gt;=2026-02-07 (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/1/artifacts --jq .artifacts[].name .github/workflows/sub-issue-closer.lock.yml e_modules/.bin/node (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 .github/workflows/poem-bot.lock.yml tartedAt,updatedAt,event,headBranch,headSha,displayTitle (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/1/artifacts --jq .artifacts[].name .github/workflows/developer-docs-consolidator.lock.yml m/_npx/b388654678d519d9/node_modules/.bin/node (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts --jq .artifacts[].name .github/workflows/developer-docs-consolidator.lock.yml ache/uv/0.11.11/x86_64/sh (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 .github/workflows/sub-issue-closer.lock.yml sh (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts --jq .artifacts[].name .github/workflows/daily-fact.lock.yml k (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1234567890
    • Triggering command: /usr/bin/gh gh api repos/{owner}/{repo}/actions/runs/1234567890 --jq {databaseId: .id, number: .run_number, url: .html_url, status: .status, conclusion: .conclusion, workflowName: .name, workflowPath: .path, createdAt: .created_at, startedAt: .run_started_at, updatedAt: .updated_at, event: .event, headBranch: .head_branch, h ../../../.pret.prettierignore ml cal/bin/grep (http block)
    • Triggering command: /usr/bin/gh gh api repos/{owner}/{repo}/actions/runs/1234567890 --jq {databaseId: .id, number: .run_number, url: .html_url, status: .status, conclusion: .conclusion, workflowName: .name, workflowPath: .path, createdAt: .created_at, startedAt: .run_started_at, updatedAt: .updated_at, event: .event, headBranch: .head_branch, 922458012/001&#39; 922458012/001&#39; bin/grep (http block)
    • Triggering command: /usr/bin/gh gh api repos/{owner}/{repo}/actions/runs/1234567890 --jq {databaseId: .id, number: .run_number, url: .html_url, status: .status, conclusion: .conclusion, workflowName: .name, workflowPath: .path, createdAt: .created_at, startedAt: .run_started_at, updatedAt: .updated_at, event: .event, headBranch: .head_branch, h ../../../.pret.prettierignore -analyzer.lock.y--log-level=error /node (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name .github/workflows/developer-docs-consolidator.lock.yml cal/bin/sh (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 .github/workflows/sub-issue-closer.lock.yml k (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name .github/workflows/daily-fact.lock.yml es/.bin/sh (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/2/artifacts --jq .artifacts[].name .github/workflows/sub-issue-closer.lock.yml es/.bin/node (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 .github/workflows/poem-bot.lock.yml c07b280e72f803545c9db35d7f69a30f6478b82fccce41756925fefd2ab0065d-d (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/2/artifacts --jq .artifacts[].name .github/workflows/developer-docs-consolidator.lock.yml k/gh-aw/gh-aw/node_modules/.bin/node (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/3/artifacts --jq .artifacts[].name .github/workflows/sub-issue-closer.lock.yml in/node (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 .github/workflows/poem-bot.lock.yml 1/x64/bin/node (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/3/artifacts --jq .artifacts[].name .github/workflows/developer-docs-consolidator.lock.yml k/gh-aw/node_modules/.bin/node (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/4/artifacts --jq .artifacts[].name .github/workflows/sub-issue-closer.lock.yml ache/node/24.14.1/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/node--show-toplevel (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 .github/workflows/poem-bot.lock.yml At,event,headBranch,headSha,displayTitle workflow/data/acgit tus.lock.yml nfig/composer/ve--show-toplevel grep stlo�� ithub/workflows/agent-persona-explorer.md grep ache/go/1.25.8/x64/pkg/tool/linux_amd64/link (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/4/artifacts --jq .artifacts[].name .github/workflows/developer-docs-consolidator.lock.yml k/node_modules/.bin/node (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/5/artifacts --jq .artifacts[].name .github/workflows/sub-issue-closer.lock.yml 1/x64/bin/node (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 .github/workflows/ai-moderator.lock.yml cfg (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/5/artifacts --jq .artifacts[].name .github/workflows/developer-docs-consolidator.lock.yml e_modules/.bin/node (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path h ../../../.pret--log-level=error st.lock.yml ache/node/24.14.1/x64/bin/grep (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 .yml nfig/composer/ve--show-toplevel grep ode_�� -quality.lock.yml s/dependabot-go-checker.lock.yml grep (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 t.lock.yml nfig/composer/ve--show-toplevel awk k/gh�� .github/workflows/smoke-pi.lock.-test.timeout=10m0s grep k/node_modules/.bin/sh (http block)
  • https://api.github.com/repos/github/gh-aw/contents/.github/workflows/shared/reporting.md
    • Triggering command: /tmp/go-build884924636/b405/cli.test /tmp/go-build884924636/b405/cli.test -test.testlogfile=/tmp/go-build884924636/b405/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true (http block)
    • Triggering command: /tmp/go-build826073148/b405/cli.test /tmp/go-build826073148/b405/cli.test -test.testlogfile=/tmp/go-build826073148/b405/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true (http block)
    • Triggering command: /tmp/go-build1169958699/b405/cli.test /tmp/go-build1169958699/b405/cli.test -test.testlogfile=/tmp/go-build1169958699/b405/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v0.47.4
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git /tmp/TestGuardPodu (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq [.object.sha, .object.type] | @tsv --show-toplevel infocmp /usr/bin/git xterm-color grep (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git /tmp/TestGuardPodu config (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv RY\|cache-memory s/dependabot-go-checker.lock.yml--ignore-path ache/uv/0.11.11/x86_64/grep (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv k.yml s/contribution-check.lock.yml ache/uv/0.11.11/x86_64/grep (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv th .prettierignore --log-level=error s/dependabot-go-checker.lock.yml bin/grep (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv json&#39; --ignore-path ../../../.pr**/*.json -consolidator.lock.yml nfig/composer/vendor/bin/grep (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv json&#39; --ignore-path ../../../.pr**/*.json k.yml p/bin/grep (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv json&#39; --ignore-path ../../../.pr**/*.json k.yml ep (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v2.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv iant-741727975/.github/workflows -consolidator.lock.yml tnet/tools/grep (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv ned-imports-enabled-with-env-template-expressions-in-body.md -consolidator.lock.yml /home/REDACTED/.local/bin/grep (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv y-test.md er.lock.yml ache/uv/0.11.11/x86_64/grep (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v3.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq [.object.sha, .object.type] | @tsv iant-741727975/.github/workflows -consolidator.lock.yml rep (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq [.object.sha, .object.type] | @tsv ed-imports-enabled-with-env-template-expressions-in-body.md k.yml /snap/bin/grep (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq [.object.sha, .object.type] | @tsv iant-633522707/.github/workflows k.yml grep (http block)
  • https://api.github.com/repos/google-github-actions/auth/git/ref/tags/v2
    • Triggering command: /usr/bin/gh gh api /repos/google-github-actions/auth/git/ref/tags/v2 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git /tmp/gh-aw-test-git config /usr/bin/gh git rev-�� --show-toplevel gh /usr/bin/git runs/20260508-11git --jq /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/google-github-actions/auth/git/ref/tags/v2 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git ons-test14477312git config epo.git git rev-�� --show-toplevel /opt/hostedtoolcache/node/24.14.1/x64/bin/node /usr/bin/git 2956/001/workflogit s/test.md /usr/bin/infocmp--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/google-github-actions/auth/git/ref/tags/v2 --jq [.object.sha, .object.type] | @tsv --show-toplevel node /usr/bin/git /home/REDACTED/worgit grep /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcache/node/24.14.--jq /usr/bin/git runs/20260508-11git grep /usr/bin/git git (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq [.object.sha, .object.type] | @tsv th .prettierignoremote.origin.url s/daily-security-red-team.lock.yml ode_modules/.bin/node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq [.object.sha, .object.type] | @tsv arn.lock.yml s/contribution-check.lock.yml bin/grep (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq [.object.sha, .object.type] | @tsv th .prettierignore --log-level=error s/dependabot-go-checker.lock.yml ode_modules/.bin/node (http block)
  • https://api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo x86_64/grep (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo p/bin/grep (http block)
    • Triggering command: /usr/bin/gh gh workflow list --repo owner/repo --json name,path,state sv (http block)
  • https://api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name h ../../../.prettierignore st.lock.yml ndor/bin/grep (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name h ../../../.prettierignore -analyzer.lock.yml cal/bin/grep (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name h ../../../.prettierignore -analyzer.lock.yml k/_temp/uv-python-dir/grep (http block)
  • https://api.github.com/repos/test/repo
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch &#34;prettier&#34; --write &#39;**/*.cjs&#39; &#39;**/*.ts&#39; &#39;**/*.json&#39; --ignore-path ../../../.pret.prettierignore grep 924636/b443/vet.cfg (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch FieldEnforcement2799351210/001 grep ache/node/24.14.1/x64/bin/node ions.md yml 1/x64/bin/grep sh t-38�� k/gh-aw/gh-aw/.g-f grep ache/node/24.14.-f (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch ithub/workflows grep 9958699/b403/vet.cfg (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@pelikhan pelikhan merged commit 92b0c3d into main May 8, 2026
@pelikhan pelikhan deleted the copilot/sec-002-fix-api-call-order branch May 8, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Safe Outputs Conformance] SEC-002: load_experiment_state_from_repo.cjs makes API call before content validation

3 participants